import { get } from "@/utils";
export type GetUserListParams = {
  query?: string;
  pagenum: number;
  pagesize: number;
};

export interface GetUserList {
    data:{
        users: GetUserItem[];
        total: number;
        pagenum: number;
    },
    meta: {
        status: number;
        msg: string;
    }
}
export type GetUserItem = {
    id: number;
    username: string;
    email: string;
    mobile: string;
    role_name: string;
    mg_state: boolean;
}
const getUserList = (params: GetUserListParams):Promise<GetUserList> => {
  return get("/users", params);
};

export default getUserList;
